package XML;

import java.net.*;

public class Practice2 {

    public static void main(String[] args) {
        String urlName="www.baidu.com";
        try {
            InetAddress[] hosts = InetAddress.getAllByName(urlName);
            for (InetAddress host : hosts) {
                System.out.println(host.getHostAddress());
            }
        } catch (UnknownHostException e) {
            e.printStackTrace();
        }
    }
}
